import parole
from parole.colornames import colors
from parole.display import interpolateRGB
import pygame, random

import sim, main
from util import *
from dungeon import makeFloor, Room, TemplateRoom
import dungeon

template = \
"""
######################
#)))              )))#
#)))              )))#
#                    #
#???  ====  ====  ***#
#!!!  |   h@   |  !!!#
######################
"""[1:]

legend = {
     '=':    parole.map.MapObjectGenerator("", 
            lambda: sim.Obj('counter', 10, parole.map.AsciiTile('=',
                colors['White']),
                blockMove=True, massNoun=False, startsVowel=False),
            clearFirst=False),
    
     ')':    parole.map.MapObjectGenerator("", 
            lambda: sim.Obj('wares', 10, parole.map.AsciiTile(')',
                colors['DimGray']),
                blockMove=False, massNoun=True, startsVowel=False),
            clearFirst=False),
    
     '?':    parole.map.MapObjectGenerator("", 
            lambda: sim.Obj('wares', 10, parole.map.AsciiTile('?',
                colors['White']),
                blockMove=False, massNoun=True, startsVowel=False),
            clearFirst=False),

      'h':    parole.map.MapObjectGenerator("", 
            lambda: sim.Obj('chair', 10, parole.map.AsciiTile('h',
                colors['Black']),
                blockMove=True, massNoun=False, startsVowel=False),
            clearFirst=False),

     '!':    parole.map.MapObjectGenerator("", 
            lambda: sim.Obj('wares', 10, parole.map.AsciiTile('!',
                colors['Cyan']),
                blockMove=False, massNoun=True, startsVowel=False),
            clearFirst=False),

      '*':    parole.map.MapObjectGenerator("", 
            lambda: sim.Obj('wares', 10, parole.map.AsciiTile('*',
                colors['DarkGray']),
                blockMove=False, massNoun=True, startsVowel=False),
            clearFirst=False),

     '@':    parole.map.MapObjectGenerator("", 
            lambda: sim.Obj('shopkeep', 10, parole.map.AsciiTile('@',
                colors['White']),
                blockMove=True, massNoun=False, startsVowel=False),
            clearFirst=False),
    
     '|':    parole.map.MapObjectGenerator("", 
            lambda: sim.Obj('counter', 10, parole.map.AsciiTile('|',
                colors['White']),
                blockMove=True, massNoun=False, startsVowel=False),
            clearFirst=False),

    '#':    dungeon.rockGenerator(colors['DimGray']),
}

floorColor1 = colors['SaddleBrown']
floorColor2 = colors['SandyBrown']
floorName = 'wood floor'
mixture = 0.3

diggable = [
    (11,0),
]

class store(TemplateRoom):
    def __init__(self, pos):
        TemplateRoom.__init__(self, template, legend, diggable, pos,
                floorColor1, floorColor2, mixture, floorName)


roomClass = store



